//
//  XGSeparatorView.m
//  新闻
//
//  Created by 小果 on 16/3/30.
//  Copyright © 2016年 小果. All rights reserved.
//

#import "XGSeparatorView.h"

@implementation XGSeparatorView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self)
    {
        self.backgroundColor = kNCToolBarBGColor;
        
        CGRect rect = CGRectMake(kNCButtonEdgeInsetX,
                                 0,
                                 frame.size.width - 2 * kNCButtonEdgeInsetX,
                                 kNCButtonHeight);
        
        UILabel *label = [[UILabel alloc] initWithFrame:rect];
        
        NSShadow *shadow = [[NSShadow alloc] init];
        shadow.shadowBlurRadius = 5;
        shadow.shadowColor = [UIColor whiteColor];
        shadow.shadowOffset = CGSizeMake(1, 1);
        
        NSDictionary *dict = @{NSFontAttributeName: kNCNormalFont,
                               NSForegroundColorAttributeName : [UIColor darkTextColor],
                               NSShadowAttributeName : shadow,
                               NSVerticalGlyphFormAttributeName : @1.0};
        label.attributedText = [[NSAttributedString alloc] initWithString:@"点击添加更多栏目" attributes:dict];
        
        [self addSubview:label];
    }
    
    return self;
}


@end
